package com.feng.spring5.service;

import com.feng.spring5.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

//@Service
@Controller
public class UserService {
    @Autowired
//    @Qualifier(value = "userDaoImpl1")
//    @Resource
//    @Resource(name = "userDaoImpl1")
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void add(){
        System.out.printf("userService add...");
        userDao.update();
    }
}
